<?php
/**
 * This class is responsible for validation operations which are required
 * across a variety of classes.
 *
 * @author Rob Young <rob@roryoung.co.uk>
 * @package forage.util
 */
class ForageValidate 
{
  public static function integer($test)
  {
    if (!is_int($test) && !ctype_digit($test)) {
      throw new InvalidArgumentException("Expecting integer, recieved a " . gettype($test));
    }
  }
}
